﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Imaginecup.sprite.changeSourceSize;
using Microsoft.Xna.Framework.Graphics;
using imaginecup.util;
using Imaginecup.util.resourceMan;
using Microsoft.Xna.Framework;

namespace Imaginecup.sprite
{
    class CompositeSprite : ISprite
    {
        List<ISprite> m_SpriteList = new List<ISprite>();

        public void AddSprite(ISprite sprite)
        {
            m_SpriteList.Add(sprite);
        }

        public void Draw(SpriteBatch spriteBatch, EntityInfo entityInfo)
        {
            foreach(ISprite sprite in m_SpriteList)
            {
                sprite.Draw(spriteBatch, entityInfo);
            }
        }

        public void Release()
        {
            foreach (ISprite sprite in m_SpriteList)
                sprite.Release();
        }
        
    }
}
